Timm Bäder [Sun, 20 Oct 2019 06:43:50 +0000 (08:43 +0200)]
text: Propagate pango attributes to placeholder
Not sure if this is really always wanted or whether we need to filter
the attributes, or even create a separate property for them.
Timm Bäder [Sun, 20 Oct 2019 06:39:55 +0000 (08:39 +0200)]
text: Fix _set_attributes docs
The list is nullable.
Timm Bäder [Sat, 19 Oct 2019 09:45:04 +0000 (11:45 +0200)]
placessidebar: Remove some unused members
Timm Bäder [Sat, 19 Oct 2019 09:40:36 +0000 (11:40 +0200)]
placesview: Use proper setters for properties
Timm Bäder [Sat, 19 Oct 2019 09:23:38 +0000 (11:23 +0200)]
text: Remove some unused members
Timm Bäder [Sat, 19 Oct 2019 09:04:03 +0000 (11:04 +0200)]
text: Fix context menu position
Fixes #2209
Timm Bäder [Sat, 19 Oct 2019 08:36:49 +0000 (10:36 +0200)]
text: Inline function into only caller
Timm Bäder [Sat, 19 Oct 2019 07:32:40 +0000 (09:32 +0200)]
text: Remove gtk_text_get_text_allocation
We can just replace that with get_width/get_height everywhere.
Timm Bäder [Sat, 19 Oct 2019 07:23:56 +0000 (09:23 +0200)]
text: Don't destroy pango layout in size_allocate
It's not needed.
Timm Bäder [Fri, 18 Oct 2019 09:44:32 +0000 (11:44 +0200)]
Adwaita: Fix menubutton in headerbar margins
Add the margins to the menubutton and not the button inside the
menubutton. This way popovers properly point to the inner button again
instead to somewhere 6px off.
Timm Bäder [Fri, 18 Oct 2019 09:43:47 +0000 (11:43 +0200)]
Adwaita: Remove padding from popover.menu
The padding belongs to the contents subnode in this case.
Timm Bäder [Fri, 18 Oct 2019 06:27:30 +0000 (08:27 +0200)]
filechooserwidget: Add .menu to right-click popover
Make it look like the other menus.
Timm Bäder [Fri, 18 Oct 2019 05:43:21 +0000 (07:43 +0200)]
filechooserwidget: Focus the searchbar when searching
This code path is taken if the search is already active, so focus the
search entry.
Timm Bäder [Fri, 18 Oct 2019 05:23:02 +0000 (07:23 +0200)]
filechooserwidget: Rename a callback
Timm Bäder [Fri, 18 Oct 2019 04:20:35 +0000 (06:20 +0200)]
shortcutlabel: Inherit from GtkWidget
Timm Bäder [Fri, 18 Oct 2019 04:20:35 +0000 (06:20 +0200)]
shortcutlabel: Inherit from GtkWidget
Timm Bäder [Thu, 17 Oct 2019 14:38:21 +0000 (16:38 +0200)]
searchentry: Make the text entry expand
Fixes the broken layout.
Timm Bäder [Thu, 17 Oct 2019 14:37:17 +0000 (16:37 +0200)]
text: Remove an unnecessary queue_draw() call
Matthias Clasen [Sat, 19 Oct 2019 22:43:34 +0000 (22:43 +0000)]
Merge branch 'wip/matthiasc/icon-theme' into 'master'
Misc icon theme cleanups
See merge request GNOME/gtk!1139
Matthias Clasen [Fri, 18 Oct 2019 14:33:45 +0000 (09:33 -0500)]
inspector: Fix node recording
When attaching renderer-specific data, we need to
make sure that we key it off the renderer that is
in use, and cope with the absence of render data.
This fixes recording nodes in the inspector.
Matthias Clasen [Fri, 18 Oct 2019 13:47:07 +0000 (08:47 -0500)]
Drop gtk_icon_info_new_for_pixbuf
It is better to keep icon infos as something you
only get from the icon theme.
Matthias Clasen [Fri, 18 Oct 2019 13:40:00 +0000 (08:40 -0500)]
Move symbolic pixbuf recoloring code
This function is better off next to the other
symbolic png code in gdkpixbufutils.c.
Matthias Clasen [Fri, 18 Oct 2019 13:23:44 +0000 (08:23 -0500)]
icon theme: Drop icon_file from GtkIconInfo
It is not used anymore.
Matthias Clasen [Fri, 18 Oct 2019 13:10:01 +0000 (08:10 -0500)]
Drop another use of icon_file
Stop using icon_file when loading symbolic svgs.
Matthias Clasen [Fri, 18 Oct 2019 12:48:46 +0000 (07:48 -0500)]
Drop another use of icon_file
Matthias Clasen [Fri, 18 Oct 2019 12:46:52 +0000 (07:46 -0500)]
Add another symbolic pixbuf helper
Matthias Clasen [Thu, 17 Oct 2019 12:55:25 +0000 (07:55 -0500)]
Avoid a use of icon_file
This is a step towards getting rid of GtkIconInfo->icon_file.
Matthias Clasen [Fri, 18 Oct 2019 12:22:11 +0000 (07:22 -0500)]
icon theme: Start to untangle GtkIconInfo
GtkIconInfo contains too much redundant data,
and it is hard to know which fields are to be
used when.
This commit starts to move towards dropping the
icon_file field - we prefer to work with the
filename directly, since it lets us avoid mime
sniffing and strdups.
Matthias Clasen [Fri, 18 Oct 2019 12:20:25 +0000 (07:20 -0500)]
Drop gtk_icon_theme_get_example_icon_name
This function is not useful. Every icon theme
on my system either does not have that field,
or has it as 'folder'. So, just use 'folder'
when you need an example icon.
Matthias Clasen [Thu, 17 Oct 2019 21:24:21 +0000 (16:24 -0500)]
Drop gtk_icon_theme_list_contexts
Contexts in icon themes are not useful for anything.
Matthias Clasen [Thu, 17 Oct 2019 21:21:45 +0000 (16:21 -0500)]
testicontheme: Remove useless function
Contexts in icon themes are not useful for anything,
so drop this function from testicontheme.
Matthias Clasen [Thu, 17 Oct 2019 12:56:27 +0000 (07:56 -0500)]
icon theme: Avoid a string copy
This is in an error path, so mostly cosmetic.
Piotr Drąg [Thu, 17 Oct 2019 18:11:58 +0000 (20:11 +0200)]
Update POTFILES.in
Matthias Clasen [Wed, 16 Oct 2019 21:53:34 +0000 (17:53 -0400)]
gl: Remove an unimplemented profiler counter
Matthias Clasen [Wed, 16 Oct 2019 21:13:20 +0000 (17:13 -0400)]
gl: Add debug spew to texture atlas
Matthias Clasen [Sun, 13 Oct 2019 00:09:14 +0000 (20:09 -0400)]
glyph cache: Go back to memcmp
Be careful to avoid padding data, and only
compare the relevant parts, leaving out the
hash key.
Matthias Clasen [Wed, 16 Oct 2019 10:34:10 +0000 (06:34 -0400)]
Cosmetics
Matthias Clasen [Thu, 17 Oct 2019 12:15:30 +0000 (07:15 -0500)]
Revert "icon theme: Avoid a string copy"
This reverts commit
0895f0211e535ac0bdf7e461bb0e046bdee60c4d.
This negatively affected icons that are included as
resources, since peek_path returns NULL for them.
Goran Vidović [Thu, 17 Oct 2019 12:03:32 +0000 (12:03 +0000)]
Update Croatian translation
Matthias Clasen [Thu, 17 Oct 2019 11:37:07 +0000 (11:37 +0000)]
Merge branch 'wip/chergert/opbuffer' into 'master'
Add OpBuffer helper for building op buffer
See merge request GNOME/gtk!1131
Goran Vidović [Thu, 17 Oct 2019 11:36:10 +0000 (11:36 +0000)]
Update Croatian translation
Goran Vidović [Thu, 17 Oct 2019 11:23:00 +0000 (11:23 +0000)]
Update Croatian translation
Benjamin Otte [Wed, 16 Oct 2019 20:25:57 +0000 (20:25 +0000)]
Merge branch 'otte/for-master' into 'master'
Otte/for master
See merge request GNOME/gtk!1136
Benjamin Otte [Wed, 16 Oct 2019 19:36:05 +0000 (21:36 +0200)]
entry: Return boolean from gtk_entry_grab_focus_without_selecting()
This follows recent changes to gtk_widget_grab_focus().
Benjamin Otte [Wed, 16 Oct 2019 15:48:25 +0000 (17:48 +0200)]
render: Fix goto
if we have pushed a shadow, we better pop it again.
Broken since
d1ea591f18f
Benjamin Otte [Wed, 16 Oct 2019 13:02:52 +0000 (15:02 +0200)]
Initialize cursor alpha to 1.0
That way, non-animated cursors don't disappear.
Benjamin Otte [Wed, 16 Oct 2019 01:07:43 +0000 (03:07 +0200)]
bindings: Make gtk_bindings_add_callback() allow for variant args
Benjamin Otte [Wed, 16 Oct 2019 01:01:49 +0000 (03:01 +0200)]
bindings: Refactor
Refactor code so that each bindings type has its own struct instead of
sharing one big union.
Timm Bäder [Wed, 16 Oct 2019 07:42:45 +0000 (07:42 +0000)]
Merge branch 'fix-popover-styles' into 'master'
Fix popover styles (GTK 4)
Closes #2061
See merge request GNOME/gtk!1079
Matthias Clasen [Wed, 16 Oct 2019 02:52:28 +0000 (22:52 -0400)]
Fix a crash with glyph caching
We need to treat atlas-less cached glyphs like
atlases, when it comes to invalidating text node
render data.
Matthias Clasen [Wed, 16 Oct 2019 00:54:24 +0000 (20:54 -0400)]
gsk: Fix uninitialized memory
This was causing crashes in some circumstances.
Matthias Clasen [Tue, 15 Oct 2019 23:20:05 +0000 (19:20 -0400)]
icon theme: Avoid a string copy
GIO has gained a way to peek at a GFile
path; lets use that.
Matthias Clasen [Tue, 15 Oct 2019 23:05:52 +0000 (19:05 -0400)]
icon theme: Avoid mime sniffing
Themed icons are always pngs or svgs.
Take advantage of that to avoid costly
mime sniffing.
Matthias Clasen [Tue, 15 Oct 2019 23:04:01 +0000 (19:04 -0400)]
pixbuf utils: Preserve format information
When we are loading themed icons, we know if
we deal with an svg or png file, so it is
entirely unnecessarily to have gdk-pixbuf
use g_content_type guess to rediscover that
information.
Change the pixbuf utils apis we have to allow
passing format information down to where we
can use it when creating the pixbuf loader.
Matthias Clasen [Tue, 15 Oct 2019 12:27:16 +0000 (08:27 -0400)]
gl: Speed up icon cache lookups
Use gdk_texture_set_render_data to avoid
hash table lookups when we can.
Matthias Clasen [Tue, 15 Oct 2019 11:51:05 +0000 (07:51 -0400)]
gl: Slightly rework the icon cache api
Return a pointer to the IconData struct. This is
closer to the glyph cache api, and will allow us
to add similar shortcuts. For now, just store
texture coords in the form we need, avoiding
converting them over and over.
Matthias Clasen [Tue, 15 Oct 2019 04:14:43 +0000 (00:14 -0400)]
Cache glyph textures in render nodes
This is a quick implementation that avoids many
glyph cache lookups. We keep an array of direct
pointers in the text render node, and throw those
cached pointers away whenever any atlases have
been dropped (since that may invalidate the cached
glyphs).
Matthias Clasen [Tue, 15 Oct 2019 03:28:15 +0000 (23:28 -0400)]
Some more vertex data reshuffling
In some cases, the vertex data is just a trivial
modification of the default data, so do that instead
of recalculating it.
Matthias Clasen [Tue, 15 Oct 2019 02:09:12 +0000 (22:09 -0400)]
Fix load_vertex_data
There was a copy-paste error that set all
uv coordinates to 0,0.
Christian Hergert [Sun, 13 Oct 2019 23:39:54 +0000 (16:39 -0700)]
gl: avoid calculating vertex_data until necessary
In many cases of the switch, we do not need the vertex data. This moves
the creation of the vertex_data array into a secondary function and only
calculates it the cases for which it is required.
Matthias Clasen [Fri, 11 Oct 2019 18:10:56 +0000 (14:10 -0400)]
gl: Drop buffer_size
No need to maintain buffer_size separately.
It is always vertices->len * sizeof (GskQuadVertex).
Matthias Clasen [Fri, 11 Oct 2019 17:59:58 +0000 (13:59 -0400)]
Drop OP_CHANGE_VAO
Instead, we accumulate vertices in a separate
array, which simplifies various things and lets
us avoid the extra copying step for the vao.
Christian Hergert [Fri, 11 Oct 2019 14:23:33 +0000 (10:23 -0400)]
prototype OpBuffer helper for building op buffer
Benjamin Otte [Tue, 15 Oct 2019 18:47:57 +0000 (18:47 +0000)]
Merge branch 'otte/for-master' into 'master'
Otte/for master
See merge request GNOME/gtk!1133
Benjamin Otte [Tue, 15 Oct 2019 14:30:46 +0000 (16:30 +0200)]
widget: Don't grab focus when can-focus == false
... inside the default vfunc.
Instead, walk the children until we find the first widget that can be
focused. If no child can be focused, return FALSE from grab_focus.
Benjamin Otte [Tue, 15 Oct 2019 14:11:03 +0000 (16:11 +0200)]
widget: Insist that widgets are rooted to be focusable
This check was in the vfunc before, but it's a general rule, so apply it
before.
Benjamin Otte [Tue, 15 Oct 2019 14:07:24 +0000 (16:07 +0200)]
widget: Make grab_focus() fail on insensitive widgets
We can return FALSE early now instead of silently failing in
gtk_window_set_focus().
Benjamin Otte [Tue, 15 Oct 2019 13:34:16 +0000 (15:34 +0200)]
widget: Make gtk_widget_grab_focus() return a boolean
So now it can actually fail.
It doesn't yet though.
Benjamin Otte [Tue, 15 Oct 2019 03:50:52 +0000 (05:50 +0200)]
bindings: Add gtk_binding_entry_add_callback()
This allows bindings that have no public API.
Benjamin Otte [Mon, 14 Oct 2019 19:34:40 +0000 (21:34 +0200)]
bindings: Add gtk_binding_entry_add_action()
Allows registering bindings for activating widget actions, as an
alternative to signal emissions.
Benjamin Otte [Mon, 14 Oct 2019 19:34:00 +0000 (21:34 +0200)]
widget: Make gtk_widget_activate_action() return TRUE/FALSE
TRUE if an action was successfully activated, FALSE if it wasn't found.
Benjamin Otte [Mon, 7 Oct 2019 04:28:28 +0000 (06:28 +0200)]
gtk: Add GtkNoSelection
Allows not to have anything selected.
Benjamin Otte [Mon, 7 Oct 2019 04:36:25 +0000 (06:36 +0200)]
singleselection: Fix model property
1. Make the model property construct-only. Allowing to change the
model has invalid side effects.
2. Add a getter for the model property.
Benjamin Otte [Sun, 13 Oct 2019 19:00:40 +0000 (21:00 +0200)]
expander: Rename CSS nodes
The expander icon is renamed from "arrow" to "expander".
The expander widget itself is renamed from "expander" to
"expander-widget" (Better ideas welcome).
This makes it possible to have an "expander" icon in more places then
the GtkExpander widget (in particular in tree lists) and not
confuse it with arrows.
Timm Bäder [Tue, 15 Oct 2019 05:13:28 +0000 (07:13 +0200)]
cssimagebuiltin: Don't create cairo nodes for empty icons
GTK_CSS_IMAGE_BUILTIN_NONE is not going to draw anything of course, so
don't bother creating an empty cairo node for it.
Timm Bäder [Tue, 15 Oct 2019 05:13:14 +0000 (07:13 +0200)]
gl renderer: Fix an out of bounds read
Fixes #2200
Matthias Clasen [Sat, 12 Oct 2019 23:00:35 +0000 (19:00 -0400)]
notebook: Avoid a crash
This is fallout from turning the menu into
a popover, causing it to be be a child.
Matthias Clasen [Sat, 12 Oct 2019 22:26:09 +0000 (18:26 -0400)]
glyph cache: Fix handling of big glyphs
We were putting big glyphs in the cache, in their
own texture, but forgetting to mark the texture
as permanent, so it could be reused, leading to
occasional misrendering. Fix this by marking these
textures as permanent, and explicitly freeing them
when the cache entry gets old.
Matthias Clasen [Sat, 12 Oct 2019 21:06:39 +0000 (17:06 -0400)]
shadow cache: Remove outdated comments
No comments are better than outdated comments.
Matthias Clasen [Sat, 12 Oct 2019 16:34:56 +0000 (12:34 -0400)]
gl: Increate the cache check frequency
Otherwise, we spread the cache over more atlases
than necessary, increasing the amount of texture
changes in each frame.
Matthias Clasen [Sat, 12 Oct 2019 16:33:43 +0000 (12:33 -0400)]
gl: Interleave cache aging
Every few frames, we do extra work for the
cache aging. Arrange for the glyph and icon
caches to not cause extra work on the same
frame, to smooth things out.
Matthias Clasen [Sat, 12 Oct 2019 16:32:49 +0000 (12:32 -0400)]
gl: Improve debug spew for caches
Dump similar information for both caches,
and correct the unused percentage for
the atlases.
Timm Bäder [Sat, 12 Oct 2019 16:26:54 +0000 (18:26 +0200)]
Update stackswitcher CSS
Add the spacing to circular stack switchers back.
Timm Bäder [Sat, 12 Oct 2019 16:09:12 +0000 (18:09 +0200)]
stackswitcher: Inherit from GtkWidget
Timm Bäder [Sat, 12 Oct 2019 15:53:59 +0000 (17:53 +0200)]
colorscale: Remove some duplicated code
Timm Bäder [Sat, 12 Oct 2019 15:41:20 +0000 (17:41 +0200)]
menuitem: Remove unused members
Timm Bäder [Sat, 12 Oct 2019 15:37:37 +0000 (17:37 +0200)]
menu: Align function parameters
Timm Bäder [Sat, 12 Oct 2019 15:27:58 +0000 (17:27 +0200)]
menu: Remove unused members
Timm Bäder [Sat, 12 Oct 2019 15:24:42 +0000 (17:24 +0200)]
menu: Remove menu_queue_resize
The have_layout flag is unused, so this is equal to a normal
gtk_widget_queue_resize().
Matthias Clasen [Sat, 12 Oct 2019 15:56:08 +0000 (15:56 +0000)]
Merge branch 'glyphcache-fiddling' into 'master'
Glyphcache fiddling
See merge request GNOME/gtk!1132
Matthias Clasen [Sat, 12 Oct 2019 15:46:10 +0000 (11:46 -0400)]
gl: Make icon cache work like glyph cache
Replace timestamp tracking with an accessed bit
here too, to keep the glyph and icon cache code
similar.
Matthias Clasen [Sat, 12 Oct 2019 15:03:04 +0000 (11:03 -0400)]
gl: Do less work on glyph caching
There is no need for us to be very precise about
aging the glyph entries. It is enough to check
occasionally and mark old entries. This reduces
the overhead of work we do every frame on the
caches, at the cost of letting glyphs linger
a bit longer in the cache.
Timm Bäder [Sat, 12 Oct 2019 07:17:24 +0000 (09:17 +0200)]
iconcache: Fix icon padding
Matthias Clasen [Sat, 12 Oct 2019 05:35:13 +0000 (01:35 -0400)]
gl: Simplify glyph cache lookup
Make this function more similar to the icon
cache equivalent, and simplify it a bit. We
don't use the boolean return, and we don't need
to look at the age of entry when marking it
used.
Matthias Clasen [Sat, 12 Oct 2019 05:00:08 +0000 (01:00 -0400)]
gl: Don't use memcmp for comparing cache keys
Some innocent change made us use a stack-allocated
key, and things broke. Lets go back to comparing
cache keys field by field.
Matthias Clasen [Sat, 12 Oct 2019 02:04:30 +0000 (22:04 -0400)]
Make the scrolling demo more versatile
Allow to swap out the content, so we can compare
text and icon scrolling.
Matthias Clasen [Sat, 12 Oct 2019 01:17:30 +0000 (21:17 -0400)]
gl: Handle row stride for icon cache upload
Same as the previous commit: Downloading a texture
may in theory give us data with a stride, so handle
that.
Matthias Clasen [Sat, 12 Oct 2019 01:16:40 +0000 (21:16 -0400)]
gl: Handle row stride for glyph cache upload
In theory, we can have data with a stride here,
so set the necessary parameters to tell GL about
it.
Matthias Clasen [Sat, 12 Oct 2019 00:42:24 +0000 (20:42 -0400)]
gl: Do less work to maintain caches
Remember which atlases were removed, and only
check those when looking for icons or glyphs
to remove. For most frames, we don't have to
check at all since no atlases were removed.
Matthias Clasen [Fri, 11 Oct 2019 23:36:26 +0000 (19:36 -0400)]
gl: Speed up icon caching
Avoid expensive padding, and just upload the
image in several slices.